/**
 * @author Mirko Bordjoski
 */	
package org.piwik.logic
{
	import mx.formatters.DateFormatter;

	/**
	* The PiwikFormatter class enables you to format the date string to a value that piwik analytics can read. 
	*/	
	public class PiwikFormatter extends DateFormatter
	{
		/**
		* Constructor. 
		*/
		public function PiwikFormatter()
		{
			super(); 
		}
		
		/**
		* Returns formated date as a String.
		*/
		static public function getDateFormat($date:Object):String
		{
			var _formater:DateFormatter = new DateFormatter();
			_formater.formatString = "YYYY-MM-DD";
			return _formater.format($date);
		}		
	}
}